package com.weihong.it.edi.service.mysql;

import com.github.pagehelper.PageHelper;
import com.weihong.it.edi.dao.UserDao;
import com.weihong.it.edi.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ${DESCRIPTION}
 *
 * @author muxiaoyu
 * @create 2017-02-20 13:44
 **/
@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    public List<User> findAllUser() {
        return userDao.select(new User());
    }

    public List<User> findUserListByPage(int pageNum,int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        return userDao.select(new User());
    }
}
